
import request from '@/utils/request'
const PREFIX = '/resource'
const RESOURCE ={
    create:(data)=>{
        return request({
            url:`${PREFIX}/create`,
            method:'post',
            data:data
        })
    },
    list:(nameKeyword,urlKeyword,categoryId,pageSize,pageNum)=>{
        return request({
            url:`${PREFIX}/list?nameKeyword=${nameKeyword}&urlKeyword=${urlKeyword}&categoryId=${categoryId}&pageSize=${pageSize}&pageNum=${pageNum}`,
            method:'get'
        })
    },
    delete:(id)=>{
        return request({
            url:`${PREFIX}/delete/${id}`,
            method:'get'
        })
    },
    update:(id,data) =>{
        return request({
            url:`${PREFIX}/update/${id}`,
            method:'post',
            data:data
        })
    }
}

export default RESOURCE